'use strict';

var __importDefault =
	(this && this.__importDefault) ||
	function(mod) {
		return mod && mod.__esModule ?
			mod : {
				default: mod
			};
	};

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require('../../utils/request');

var globalData_1 = require('../../globalData');

var marketingRequest = new request_1['default']({
	ApiUrl: globalData_1['default'].marketingUrl
}); // 【充值活动msg】

exports.getRechargeRewardMemo = function(params) {
	return marketingRequest.getRequest({
		url: 'app/activity/recharge/rechargeRewardMemo',
		data: params
	});
};
// 【充值活动详情】
exports.getRechargeRewardsDetail = function(params) {
	return marketingRequest.getRequest({
		url: 'app/activity/recharge/rechargeRewardsDetail',
		data: params
	});
};
exports.gettotalDegreeQuery = function(params) {
	return marketingRequest.getRequest({
		url: 'app/user/card/totalDegreeQuery',
		data: params,
		header: {
			Authorization: uni.getStorageSync('token'),
			token: uni.getStorageSync('token')
		}
	});
};
exports.getpowerCardSelectionList = function(stationId) {
	return marketingRequest.getRequest({
		url: 'app/user/card/powerCardSelectionList/' + stationId,
		header: {
			Authorization: uni.getStorageSync('token'),
			token: uni.getStorageSync('token')
		}
	});
};
exports.getchargeConversionAmountQuery = function(params) {
	return marketingRequest.getRequest({
		url: 'app/user/card/chargeConversionAmountQuery',
		data: params,
		header: {
			Authorization: uni.getStorageSync('token'),
			token: uni.getStorageSync('token')
		}
	});
};

exports.getdegreeLockAmountQuery = function(params) {
	return marketingRequest.postRequest({
		url: 'app/order/degreeLock',
		data: params,
		header: {
			Authorization: uni.getStorageSync('token'),
			token: uni.getStorageSync('token')
		}
	});
};
// 【获取充值金额列表】
exports.rechargeRewardsList = function(params) {
	return marketingRequest.getRequest({
		url: 'app/activity/recharge/rechargeRewardsList',
		data: params
	});
};

//首充有礼详情
exports.firstChargeDetail = function(params) {
	return marketingRequest.getRequest({
		url: 'app/activity/consume/firstChargeDetail',
		data: params
	});
};